Part Number Hot Search : 
HC406 BUK7L1 2N7002K DWS31 SY8022 MAX7321 PDTC124E MPC905
Product Description
Full Text Search
 

To Download AN667 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  rev. 0.1 2/12 copyright ? 2012 by silicon laboratories AN667 AN667 g etting s tarted with the s ilicon l abs p recision 32? ide 1. introduction this application note descri bes the precision32? integrated deve lopment environment (ide ) for the silicon labs 32-bit microcontrollers (sim3xxxx). this ide is based on the eclipse platform. 2. key points ?? importing and building projects with the precision32 ide ?? ide overview ?? debugging with the precision32 ide ?? getting started: blinky example 3. relevant documentation ?? precision32 help: in the precision32 ide, go to help ? help contents ?? eclipse documentation: http://hel p.eclipse.org/indigo/index.jsp 4. hardware requirements the precision32 ide has the following hardware requirements: ?? a standard x86 pc with 1 gb ram minimum (2 gb re commended) and 500 mb+ of available disk space, running one of the following operating systems (both 32-bit and 64-bit systems are supported): ?? microsoft? windows xp (sp2 or greater) ?? microsoft? windows vista ?? microsoft? windows 7 an internet connection is required to request and activate license keys.
AN667 2 rev. 0.1 5. workspaces a workspace in the precision32 ide is a grouping of active projects. the workspace contains the top-level ide settings, including the global defaults, view window positio ns, and the projects in the workspace. the workspace information is contained in the metadata (.metadata) subdire ctory in the workspace directory. any projects added to the workspace will be copied to this location if the copy projects into work space option is selected. after launching precision32, the workspace dialog shown in figure 1 prompts for a workspace location. to select a workspace, either browse to an existing wo rkplace or select a new workspace location. figure 1. selecting a workspace to change the workspace while the ide is open, go to file ? switch workspace .
AN667 rev. 0.1 3 6. activating precision32 ide prior to registering the precision32 ide, the size of t he debug image is limited to 8 kb and trace functionality is disabled. to register the precision32 ide, follow the instructions on the initial landing page after opening the software. this process will require an internet connection. 1. in the ide, go to help ? product activation ? create serial nu mber and activate . 2. write down the displayed serial number or copy it to the clipboard. 3. press ok and a web browser will open on the activati ons page. a mysilabs account is required to enter the serial number in the page. 4. complete the rest of the form and pre ss the button to request the activation code. 5. copy the activation code. 6. navigate to help ? product activation ? enter activation code . 7. enter the activati on code and press ok. once activated, the landing page will u pdate and all features are available. figure 2. registered landing page
AN667 4 rev. 0.1 7. projects a precision32 project contains files, build options, and project settings. projects generally exist as a directory containing sub-directories and files. th e project structure seen in the ide is replicated physically on the disk. however, a project may also contain linked files or directories which are just pointers to files or folders outside of the project directory. 7.1. project structure the projects generated by the silic on labs appbuilder and the sdk follo w a recommended project structure. these projects have three categories of source files: 1. the my* files and any user generated files are located in a src subdirectory under the project directory. appbuilder will generate my* files if they do not exist, but will not mo dify existing copies . this ensures that user updates to my* files are safe when re-exporting a project from appbuilder. 2. generated (g*) files are located in src\generated . these files contain all the automatically generated appbuilder code. these files will a lways be overwritten when a projec t is re-exported, and any user changes to these files will be lost. 3. the si32 sdk firmware package consisting of the hal, code examples, and si32library is located in a linked folder at c:\silabs\32bit\si32-x.y by default, where x is the major version and y is the minor version. each project is compiled against a version of the hal or si32library. 7.1.1. setting the si licon labs sdk path the silicon labs hal revision is sele cted using the drop-down menu in the precision32 ide footer shown in figure 3. figure 3. selecting the silicon labs sdk path a warning is displayed if the ide cann ot find the previously-selected path. for projects that do not us e the silicon labs sdk, this drop-down menu can be toggled on or off by clicking on silicon labs ? show sdk selector .
AN667 rev. 0.1 5 7.2. creating a new project to create a new code projec t, launch the silicon labs appbu ilder software by selecting new precision32 project... in the quickstart view to generate the device initialization code for the 32-bit device. then, checking the open after export option in appbuilder will automatically open the exported appbuilder workspace and project in the ide. figure 4. automatically opening a new workspace
AN667 6 rev. 0.1 7.3. importing a project to import an existing project such as a precision32 code example: 1. select the si32 sdk path as described in ?7.1.1. sett ing the silicon labs sdk path?. 2. click the import si32 sdk example(s) link in the quickstart view. if the sdk path is appropriately set, all available projects in the sdk will auto matically populate th e projects area. 3. (optional) press the browse... button to select a device-specific set of examples. 4. select the checkboxes for the projects to import. 5. ensure the copy projects into workspace checkbox is checked. 6. press the finish button. figure 5 shows the process of importing a project. when an existing project is imported into a workspace, it will be copi ed into the workspace directory if the copy projects into workspace option is selected. after the import, all changes to the copied files are local and specific to that workspace, which ensures the master copy of the pr oject is unchanged. if a project is added to a workspace without making a copy, any modifications to the workspace modify the original project. any modifications to the linked sdk files will modify the master copy. figure 5. importing a project
AN667 rev. 0.1 7 7.4. building a project once a project is open and selected in the workspace, the quickstart view will update with a build ?project? [debug] option shown in figure 6. selecting this option will comp ile all the files associat ed with the pr oject. the output of the build will appear in the console view. section ?8. build options? discusses the full build options and configurations available. figure 6. building a project 7.5. refreshing a project the ide will not immediately reflect files added to a project outside of the ide. to refresh a project and reload the references from the di sk, right-click on the project explorer view and select refresh as shown in figure 7. figure 7. refreshing a project
AN667 8 rev. 0.1 7.6. cleaning a project to clean the project build files from a workspace directory, select the clean ?project? [debug] option in the quickstart view. figure 8 shows the clean menu option. figure 8. cleaning a project 7.7. removing a proj ect from a workspace the project can either be removed from the workspace or physically deleted from the disk. to remove a project from a workspace, right-click on the project name in the project explorer view and select delete . a dialog will open with a delete project contents on disk (cannot be undone) option that will physica lly delete the project files, if selected.
AN667 rev. 0.1 9 8. build options each project stores the project build settings . these settings can be accessed through the project ? properties menu or by right clicking in the project explorer view and selecting properties . 8.1. settings the c/c++ build ? settings section contains most of the build settings for the project. the view build options for ?project? option in the build and settings section of the quickstart view is another way to open this same build settings view. the c/c++ build ? settings ? tool settings view has many options for optimization levels, display warnings, and other build settings. the c/c++ build ? settings ? build steps view has options for pre- and post-build steps. these settings will not need to change for mo st applications. 8.2. paths and symbols the c/c++ general ? paths and symbols section has settings for the project include paths for each configuration and language combination. when adding a path, select the add to all configurations and add to all languages options unless the paths should be omitted from configurat ions or languages. this settings view also contains libraries and library path information. 8.3. build configurations a build configuration is a named colle ction of build options. the precision32 has two build configurations by default: debug and release. the debug build configuration has no optimization and includes all debug symbols in the build. the release build option has high optimiza tion and includes no debug symbols in the build.
AN667 10 rev. 0.1 9. ide layout overview the default precision32 ide has four main areas: projec t explorer, code editor, quickstart, and status. these view windows and areas are completely configurable. figure 9. precision32 ide layout overview 9.1. project explorer the project explorer view displays the projects associated with th e active workspace. each project has a set of subdirectories, though some of these subdirectories may not always be present: ?? after a successful build, binaries includes the binary files associated with the project. ?? includes contains the external include f iles outside the project structure. ?? the debug folder contains the build information, include ma ke files, object files, and other build outputs. ?? the src folder contains all of the project source files. the project explorer also displays several icons to provide extra in formation about the project. a small red x on a folder indicates that the file didn?t build correctly. in add ition, icons indicate when linked resources cannot be found. double clicking any files in the project explorer will open that file in the code editor view. each file can also be expanded to show a list of includes, defines, and functions used by that file. double clicking one of these will jump to the co rresponding line in the file. project explorer view status view code editor view quickstart view
AN667 rev. 0.1 11 9.2. quickstart the quickstart view is the primary portal to all precision32 dev elopment tasks. this view will be extended in the future to include more features and tasks. most of the functions available in the quickstart view are available in other locations in the ide. however, these alternate methods sometimes behave differently than the quickstart link. the quickstart view is the quickest and easiest way to navigate the development tasks in the ide. 9.3. code editor the code editor view has many customizable options. this section discusses the de fault behavior in the precision32 ide. hovering over a symbol in the code editor view will open a type-specific viewer. for variables, this pop-up viewer displays the declaration of the variable. the viewer displays an expanded version of macros. finally, hovering over a function will display the firs t few lines of the function. right-clicking on a symbol provides a long list of options. for example, selecting source ? correct indentation will adjust the indentatio n of the line, and source ? toggle comment will toggle betw een commenting or uncommenting the line. the declarations , references , search text options will do various searches and open a search view in the status view. the panel to the right of the scroll bar displays tags as shown in figure 10. a red tag here indicates a build error, while a yellow tag indicates a warning. a blue tag indicate s an informational message. hovering over the tag with the mouse cursor provides more information about the problem. figure 10. code editor tags
AN667 12 rev. 0.1 9.4. status the status area contains status information for the project. the console view contains context-sensitive information. for example, after clicking the build ?project? [debug] link in the quickstart view, the console view displays the build feedback; during a debugging session, the console view can display debugging printf() information. clicking on a project or other element may change or restrict the inform ation displayed in the console view. the display selected console button on the right side of the console view shown in figure 11 can be used to manually switch between consoles. figure 11. display selected console button any build errors in the console view will be highlighted in red. double c licking on an error will jump to the error in code. the console view for each process (building or debugging) is reset upon the reinitializat ion of that process. for example, the console wit h build errors for a project will reset when another build of the same project starts. 9.4.1. problems view the problems view in the status view aggregates all errors and warnings encountered during a build and displays them in a hierarchical fashion. this saves the need to search through the build log to find a list of the errors in a multiple-file project. double -clicking on these entries will jump to the er ror or warning in th e corresponding file. figure 12 shows the problems view. figure 12. console problems view 9.4.2. other views the precision32 ide has many options for additional tabs in the status view area. these views can be added by using window ? show view ? other .
AN667 rev. 0.1 13 9.5. perspectives a perspective in the precision32 ide is a collection of views and their placement. the current perspective is highlighted in the upper-right corner of the ide view as shown in figure 13. additional perspectives can be added. figure 13. ide perspectives selected perspective
AN667 14 rev. 0.1 10. debugging the debug ?project? [debug] link in the quickstart view starts a debugging sessio n. starting a debug session will automatically recompile the project (if required), connect to and flash the device, and run to first line of main(). the ide will automatically open a debug view if is not open when a debugging session begins. to restart a debug session, first exit debug mode to free the debug adapter by clicking the red square terminate button. then, press the debug ?project? [debug] link in the quickstart view. when debugging, hovering ov er a symbol will have context-sensitive info rmation. for example, hovering over a function in debug mode shows the address of t he function instead of the first lines of code. figure 14 shows the default debug configuration of the ide. figure 14. debugging in the precision32 ide
AN667 rev. 0.1 15 10.1. the printf() function the redlib semi-hosting library is used by de fault to route printf() statements to the console view. projects compiled using the semi-hosting library will hang when printf() statements ar e encountered and the device is not connected to the ide. projects built with the no-host library will work pro perly without the ide, but will not have printf statements directed to the console view. to switch the library used when building the project: ?? open the mylinkeroptions_p32.ld file located in the project directory in any text editor. ?? to enable debugging printf(), uncomment line 6 of the file ( group(libcr_semihost.a libcr_c.a libcr_eabihelpers.a) ) and comment out line 7 of the file. ?? to enable normal printf(), uncomment line 7 of the file ( group(libcr_nohost.a libcr_c.a libcr_eabihelpers.a) ) and comment out line 6 of the file. figure 15 shows the printf() options in the linker file. figure 15. switching printf() options 10.2. debug view the debug view shown in figure 16 has debugging control butto ns and the stack trace view. the buttons at the top of the view can run ( resume ), stop ( pause ), and reset ( restart ) the device. the terminate button exits debug mode. when halted at a breakpoint, the debug view has options to step into, over, and out of functions. the code view is lined with the stack trace, and highlighting a stack call will ju mp to that call in code. the stack viewer shows the device process stack (gdb debugger) and entries for the host gdb and debug process. figure 16. debug view uncomment for debug printf() uncomment for release printf() terminate debug session step into step over run / resume reset / restart stop / pause
AN667 16 rev. 0.1 10.3. breakpoints add a breakpoint to a project by double-clicking on a blue area to the left of the code editor view. lines that are not marked with blue are ineligible for breakpoints. the breakpoint view in figure 17 shows the current breakpoints and has options to enable or disable breakpoints without removing them. double-clicking on breakpoint jumps to the related code in the code editor view. figure 17. breakpoint view when stopped at a breakpoint, right-clicking on the code editor enables options to run to a particular line of code or add variables to the expressions watch view. breakpoint breakpoint window
AN667 rev. 0.1 17 10.4. peripherals the peripherals view contains a list of peripherals for the dev ice connected to the ide. selecting the checkbox next to a peripheral adds the peripheral to the memory view. if the memory view is not visible when a peripheral is added, the ide focu s will switch to the memory view. figure 18 displays the peripherals view. figure 18. peripherals view peripherals window select the peripheral memory window
AN667 18 rev. 0.1 10.5. memory the memory view performs all memory vi ewing, which includes the device peripherals. for peripherals, the memory view has a registers ? bit fields hierarchy. hovering the mouse cursor over a register or bit field causes a verbose tool tip to open. this view allows th e state of the device to be changed while stopped at a breakpoint. non-peripheral memory views are added to the memory view by selecting the green icon. figure 19 shows the memory view. figure 19. memory view add new memory area hovering reveals additional information
AN667 rev. 0.1 19 10.6. core registers the core registers view shown in figure 20 displays the core registers of the device. some core peripherals such as the nvic are included with the peripherals. figure 20. core registers view core registers window
AN667 20 rev. 0.1 10.7. expressions the expressions view opens automatically when a new watch variable is added by right-clicking on the code editor view and selecting add watch expression... . this view displays the contents of variables, structures, and other data types added to the watch list. figure 21 shows the expressions view. figure 21. expressions view expressions window
AN667 rev. 0.1 21 11. getting started: blinky example to run and debug the blinky example: 1. open the precision32 ide. 2. (optional) register the ide using the st eps listed in ?6. activating precision32 ide?. 3. set the silicon labs sdk path ( c:\silabs\32bit\si32-x.y by default) in the drop-down menu at the bottom of the ide. 4. import the blinky example project: a. click the import si32 sdk example(s) link in the quickstart view. b. select the checkbox for the blinky project. c. select the copy projects into workspace checkbox. d. press the finish button. 5. select the blinky project in the project explorer view. 6. build the project by selecting quickstart ? build ?blinky? [debug] . 7. connect the silicon labs debug adapter ri bbon cable to the header on the mcu card. 8. connect the silicon labs debug adapter to the pc. 9. start a debug session by selecting quickstart ? debug ?blinky? [debug] . 10. press the debug ? resume button to run the code. the leds on the mcu card will blink and the console view will print the status of the switches. figure 22. blinky example
AN667 22 rev. 0.1 c ontact i nformation silicon laboratories inc. 400 west cesar chavez austin, tx 78701 tel: 1+(512) 416-8500 fax: 1+(512) 416-9669 toll free: 1+(877) 444-3032 please visit the silicon labs technical support web page: https://www.silabs.com/support/pages/contacttechnicalsupport.aspx and register to submit a technical support request. silicon laboratories and silicon labs are trademarks of silicon laboratories inc. other products or brandnames mentioned herein are trademarks or registered trademarks of their respective holders. the information in this document is believed to be accurate in all respects at the time of publication but is subject to change without notice. silicon laboratories assumes no responsibility for errors and omissions, and disclaims responsib ility for any consequences resu lting from the use of information included herein. a dditionally, silicon laboratorie s assumes no responsibility for the functioning of und escribed features or parameters. silicon laboratories reserves the right to make changes without further notice . silicon laboratories makes no wa rranty, rep- resentation or guarantee regarding the suitability of its products for any particular purpose, nor does silicon laboratories as sume any liability arising out of the application or use of any product or circuit, and s pecifically disclaims any an d all liability, including wi thout limitation conse- quential or incidental damages. silicon laborat ories products are not designed, intended, or authorized for use in applications intended to support or sustain life, or for any other application in which the failure of the silicon laboratories product could create a s ituation where per- sonal injury or death may occur. should buyer purchase or us e silicon laboratories products for any such unintended or unauthor ized ap- plication, buyer shall indemnify and hold silicon laboratories harmless against all claims and damages.


▲Up To Search▲   

 
Price & Availability of AN667

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X